#ifndef _BIG_INT_H_
#define _BIG_INT_H_
	#include<stdint.h>
	#include<stddef.h>
	#include"rand-dev.h"

	typedef struct big_unsigned{
		uint32_t *num;
		size_t size;
	}big_unsigned;

	big_unsigned big_unsigned_rand(rand_dev*,size_t bytes);
	big_unsigned big_unsigned_from_unsigned(uint32_t);
	big_unsigned big_unsigned_from_string(const char*);
	big_unsigned big_unsigned_copy(const big_unsigned*);
	void big_unsigned_destruct(big_unsigned*);
	void big_unsigned_print(const big_unsigned*);
	void big_unsigned_decline(big_unsigned*);
	void big_unsigned_add(big_unsigned* restrict,const big_unsigned* restrict);
	void big_unsigned_subtract(big_unsigned* restrict,const big_unsigned* restrict);
	void big_unsigned_multiply_unsigned(big_unsigned*,uint32_t);
	void big_unsigned_mod_multiply(big_unsigned*,const big_unsigned*,const big_unsigned* restrict);
	void big_unsigned_mod(big_unsigned* restrict,const big_unsigned* restrict);
	uint32_t big_unsigned_div_unsigned(big_unsigned*,uint32_t);
	int big_unsigned_cmp(const big_unsigned*,const big_unsigned*);
	int big_unsigned_not_zero(const big_unsigned*);
	int big_unsigned_is_odd(const big_unsigned*);
	size_t big_unsigned_lowbit(const big_unsigned*);
	void big_unsigned_rshift(big_unsigned*,size_t);
	void big_unsigned_lshift(big_unsigned*,size_t);
	big_unsigned big_unsigned_mod_power(uint32_t base,const big_unsigned* restrict index,const big_unsigned* restrict mod);
#endif